package com.zhz.feign;

import com.zhz.config.feign.OAuth2FeignConfig;
import com.zhz.dto.UserBankDto;
import com.zhz.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author ：zhz
 * @date ：Created in 2021/01/17
 * @version: V1.0
 * @slogan: 天下风云出我辈，一入代码岁月催
 * @description:
 **/
@FeignClient(name = "member-service",contextId = "userBankServiceFeign" ,configuration = OAuth2FeignConfig.class ,path = "/userBanks")
public interface UserServiceFeign {

    /**
     * 用于admin-service里面远程调用member-server
     * @return
     */
    @GetMapping("/basic/users")
    Map<Long,UserDto> getBasicUsers(
            @RequestParam(value = "ids",required = false) List<Long> ids,
            @RequestParam(value = "userName",required = false) String userName ,
            @RequestParam(value = "mobile",required = false) String mobile
    ) ;

}
